Platform Explorer / Nuxeo Platform 2021.62

Operation Document.RemoveItemFromListProperty (Removes an Entry From a Multivalued Property)

Description

This operation removes an entry from a multivalued property, specified using a xpath (e.g.: contract:customers). A specific entry can be removed using its index number. If the index parameter is left empty, all entries in the property are removed. Activating the save parameter forces the changes to be written in database immediately (at the cost of performance loss), otherwise changes made to the document will be written in bulk when the chain succeeds.

Save parameter has to be turned off when this operation is used in the context of the empty document created, about to create, before document modification, document modified events.

Operation id Document.RemoveItemFromListProperty
Category Document
Label Removes an Entry From a Multivalued Property
Requires
Since

Parameters

Name Description Type Required Default value
xpath string yes  
index integer no  
save boolean no true 

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.RemoveItemFromListProperty
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "Document.RemoveItemFromListProperty",
  "label" : "Removes an Entry From a Multivalued Property",
  "category" : "Document",
  "requires" : null,
  "description" : "This operation removes an entry from a multivalued property, specified using a xpath (e.g.: contract:customers). A specific entry can be removed using its index number. If the index parameter is left empty, all entries in the property are removed. Activating the save parameter forces the changes to be written in database immediately (at the cost of performance loss), otherwise changes made to the document will be written in bulk when the chain succeeds. <p>Save parameter has to be turned off when this operation is used in the context of the empty document created, about to create, before document modification, document modified events.</p>",
  "url" : "Document.RemoveItemFromListProperty",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "xpath",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "index",
    "description" : null,
    "type" : "integer",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "save",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  } ]
}